package org.example.Demo;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Hello {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(8888);

        while (true){
            //管道接通
            Socket socket = serverSocket.accept();
            Thread thread = new MyThread(socket);
            thread.start();
            System.out.println(thread.getName() + " 正在执行!!!");
        }

    }
}
